<!DOCTYPE html>
<html>

<head>
  <title><%= title %></title>
  <link rel='stylesheet' href='/stylesheets/style.css' />

  <%- include common %>

</head>

<body>
  <%-  include("head",{title:"index",username}) %>
  <h1><%= title %></h1>
  <p>Welcome to <%= title %></p>

  <% if(username){ %>
  <h1><%= username %>,欢迎登录</h1>
  <button class="btn btn-warning" onclick="location.href='/logout'">退出登录</button>
  <button class="btn btn-success" onclick="location.href='/mav'">电影</button>
  <% }else{        %>
  <button class="btn btn-danger" onclick="location.href='/login'">登录</button>
  <button class="btn btn-primary" onclick="location.href='/register'">注册</button>
  <% }             %>


  <%- include foot   %>


</body>

</html>